In the imaging device, in the case where a ghost is removed, conventionally, as disclosed in e.g. patent literature 1, the position of a light source is estimated by a certain method, and a ghost portion is presumably determined by simulation based on the estimated position of the light source for ghost removal. On the other hand, patent literature 2 proposes a method for estimating a ghost portion by estimating the position of a light source by changing a focus position or moving a camera platform.
In the method disclosed in patent literature 1, detection precision of ghosts involves position measurement precision of a light source or precision of simulation. A cost and a time are required for obtaining high precision. Further, the method for estimating the position of a light source has the premise that an image of the light source is included in a captured image, and in the case where an image of the light source is not included, detection is impossible. Further, in the method disclosed in patent literature 2, ghost detection on a real-time basis is impossible.